package org.web.project.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.web.project.domain.Project;
import org.web.project.service.ProjectService;
import org.web.project.mapper.ProjectMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author tang
* @description 针对表【project】的数据库操作Service实现
* @createDate 2024-10-29 10:14:46
*/
@Service
public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project>
    implements ProjectService{

    @Autowired
    private ProjectMapper projectMapper;
    @Override
    public Project selectByPid(Long pid) {
        return projectMapper.selectById(pid);
    }

    @Override
    public List<Project> selectByLikeName(String name) {
        QueryWrapper<Project> queryWrapper = new QueryWrapper<>();
        queryWrapper.like("name",name);
        return projectMapper.selectList(queryWrapper);
    }
}




